package com.chzc.fm.duotin.bean.mine;

import com.google.gson.Gson;
import com.google.gson.reflect.TypeToken;

import java.lang.reflect.Type;
import java.util.ArrayList;
import java.util.List;

/**
 * Created by BillSinla on 2016/6/30.
 */
public class UserInfo {

    /**
     * id : 1692597
     * username : 826949492
     * sex : 0
     * qq :
     * mobile :
     * email : 826949492@qq.com
     * signature :
     * platform : dt
     * user_key : ead2086b402214ed501b606d53d9600a
     * is_podcaster : 0
     * is_v : 0
     * image_url :
     * real_name : 826949492
     * car_name :
     * birthday : 2016-06-29
     * car_mac :
     */

    private int id;
    private String username;
    private int sex;
    private String qq;
    private String mobile;
    private String email;
    private String signature;
    private String platform;
    private String user_key;
    private int is_podcaster;
    private int is_v;
    private String image_url;
    private String real_name;
    private String car_name;
    private String birthday;
    private String car_mac;

    public static UserInfo objectFromData(String str) {

        return new Gson().fromJson(str, UserInfo.class);
    }

    public static List<UserInfo> arrayUserInfoFromData(String str) {

        Type listType = new TypeToken<ArrayList<UserInfo>>() {
        }.getType();

        return new Gson().fromJson(str, listType);
    }

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public String getUsername() {
        return username;
    }

    public void setUsername(String username) {
        this.username = username;
    }

    public int getSex() {
        return sex;
    }

    public void setSex(int sex) {
        this.sex = sex;
    }

    public String getQq() {
        return qq;
    }

    public void setQq(String qq) {
        this.qq = qq;
    }

    public String getMobile() {
        return mobile;
    }

    public void setMobile(String mobile) {
        this.mobile = mobile;
    }

    public String getEmail() {
        return email;
    }

    public void setEmail(String email) {
        this.email = email;
    }

    public String getSignature() {
        return signature;
    }

    public void setSignature(String signature) {
        this.signature = signature;
    }

    public String getPlatform() {
        return platform;
    }

    public void setPlatform(String platform) {
        this.platform = platform;
    }

    public String getUser_key() {
        return user_key;
    }

    public void setUser_key(String user_key) {
        this.user_key = user_key;
    }

    public int getIs_podcaster() {
        return is_podcaster;
    }

    public void setIs_podcaster(int is_podcaster) {
        this.is_podcaster = is_podcaster;
    }

    public int getIs_v() {
        return is_v;
    }

    public void setIs_v(int is_v) {
        this.is_v = is_v;
    }

    public String getImage_url() {
        return image_url;
    }

    public void setImage_url(String image_url) {
        this.image_url = image_url;
    }

    public String getReal_name() {
        return real_name;
    }

    public void setReal_name(String real_name) {
        this.real_name = real_name;
    }

    public String getCar_name() {
        return car_name;
    }

    public void setCar_name(String car_name) {
        this.car_name = car_name;
    }

    public String getBirthday() {
        return birthday;
    }

    public void setBirthday(String birthday) {
        this.birthday = birthday;
    }

    public String getCar_mac() {
        return car_mac;
    }

    public void setCar_mac(String car_mac) {
        this.car_mac = car_mac;
    }
}
